package com.demo;

import org.activiti.engine.ProcessEngine;
import org.activiti.engine.TaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@SpringBootApplication
public class App {

	@Autowired
	private TaskService taskService;
	@Autowired
	private ProcessEngine processEngine;

	public static void main(String[] args) throws Exception {
		SpringApplication.run(App.class, args);
	}
	
	@RequestMapping("/")
	String index() {
		System.out.println("################################taskService" + taskService);
		System.out.println("################################processEngine" + processEngine);
		return "xxxxxxxxxxxxx";
	}
	
	@RequestMapping("/task")
	String task() {
		System.out.println("################################" + taskService);
		return taskService.toString();
	}


}
